package com.example.controller;

import com.example.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhangguoqing
 * @date 2020/10/12
 * Description: TODO
 */
@RestController
@RequestMapping("/interface")
@Api(tags = "MyController", description = "我的controller")
public class MyController {


    @PostMapping("/post")
    @ApiOperation(value = "POST测试")
    public User post(@RequestBody User user){
        System.out.println(user);
        return user;
    }

    @GetMapping("/get")
    @ApiOperation(value = "GET测试")
    public User get(User user){
        System.out.println(user);
        return user;
    }
}
